/**********************************************************************************************************************
 * @file    config.h
 * @author  Queclink Hubert.Lee
 * @date    2016-10-31
 * @brief   片外Flash模块配置文件
 *
 * Copyright (C) 2016 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 *
 * @attention
 *
 * @MX25L1606E
 *  2MB(16Mb), 512 sectors, 4KB/sector, offset address range of a sector is 0x0000~0x0FFF
 *  32 blocks, 64KB/block, offset address range of a block is 0x00000~0x0FFFF
 *  Support: SPI, Mode0 and Mode3
 *  Program: according to byte, cost 9us(typical), or according to page, 256B/page, cost 0.6ms(typical) 3ms(max)
 *  Erase: according to sector/block/chip, 16pages/sector, 16sectors/block,
 *         cost 40ms/sector 400ms/block 6.5s/chip typical
 *
 * @usage
 *
 *********************************************************************************************************************/


#ifndef __AADL_FLASH_CONFIG_H
#define __AADL_FLASH_CONFIG_H

/* includes ---------------------------------------------------------------------------------------------------------*/
#include "aadl/aadl.h"

#ifdef __cplusplus
extern "C" {
#endif


#define FLASH_FATAL_DATA_BKP_INTERVAL	3				/* 关键数据(如系统参数)自动备份间隔, 单位min, 0:实时备份 */

#define FLASH_MAX_UNIT_SIZE				256				/* 单元数据(一次性读写的数据)最大长度, 单位byte */

#define FLASH_DEBUG_PREFIX				"[FLASH]: "		/* 调试信息前缀 */
#define FLASH_LOGLEVEL_INITIAL			LOG_ALL			/* 默认的LOG等级, LOG_OFF:关闭调试打印功能 */


#ifdef __cplusplus
}
#endif

#endif /* __AADL_FLASH_CONFIG_H */